package database;

import java.sql.Connection;
import java.sql.SQLException;

import org.springframework.beans.BeansException;

import database.dao.RecordFileInfoDao;
import database.pojo.RecordFileInfo;
import util.JdbcUtils;
import util.MyFactory;

public class RecordFileDBServer {
	
	public boolean insert(RecordFileInfo rFileInfo ) throws BeansException, SQLException {
		Connection conn =null;
		try {
			conn = MyFactory.context.getBean("JdbcUtils", JdbcUtils.class).getConnection();
			return MyFactory.context.getBean("RecordFileInfoDao", RecordFileInfoDao.class).insert(conn,rFileInfo);
		} finally {
			// TODO: handle exception
			MyFactory.context.getBean("JdbcUtils", JdbcUtils.class).releaseConnection(conn);
		}
	}
	
}
